/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.frm.bpm.pojo;

import java.io.Serializable;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;

/**
 *
 * @author Kenn
 */
public class Cash implements Serializable {
    
    private Double receivables;
    private Double payables;
    private Double cashBefore;
    private Double totalCash;
    private Timestamp date;
    private String month;
    private SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM");

    public Cash(Double cashBefore, Double receivables, Double payables, Timestamp date) {
        this.receivables = receivables;
        this.payables = payables;
        this.cashBefore = cashBefore;
        this.totalCash = cashBefore + receivables - payables;
        this.date = date;
        month = sdf.format(date);
    }
    
    public Double getCashBefore() {
        return cashBefore;
    }

    public void setCashBefore(Double cashBefore) {
        this.cashBefore = cashBefore;
    }

    public Double getPayables() {
        return payables;
    }

    public void setPayables(Double payables) {
        this.payables = payables;
    }

    public Double getReceivables() {
        return receivables;
    }

    public void setReceivables(Double receivables) {
        this.receivables = receivables;
    }

    public Double getTotalCash() {
        return totalCash;
    }

    public void setTotalCash(Double totalCash) {
        this.totalCash = totalCash;
    }

    public Timestamp getDate() {
        return date;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

}
